package monster.flight.admin.action.xtgl.user;

import java.util.HashMap;
import java.util.List;

import monster.comm.action.BaseJsonListAction;
import monster.comm.exception.InvalidParameterException;
import monster.comm.log.ILog;
import monster.comm.log.LogService;
import monster.comm.util.ReturnConstant;
import monster.flight.admin.manager.service.xtgl.UsersService;
import monster.flight.comm.entity.vo.Xt_users;

/**
 * 
* 创建信息=============
* 类名: monster.flight.admin.action.xtgl.user.UserListAction
* 类作用描述: 后台系统管理后台管理人员查询分页
* 创建人： wanghong 
* 创建时间： 2013-1-18 上午11:25:17
* 修改信息1=============
* 修改类型:     //1.修改bug 2.业务变化修改
* 修改描述: 
* 修改人：  
* 修改时间：
 */
public class UserListAction extends BaseJsonListAction<UsersService, Xt_users> {
	private static final long serialVersionUID = 232081467116905972L;
	ILog log =LogService.getLog(UserListAction.class);
	public List<Xt_users> list;
	private Xt_users xt_users;
	private UsersService usersService;
	
	/**
	 * 用户分页方法
	 * @return
	 */
	public String listUser() {
		
			 String islogin = this.isLogin();
			 if("1".equals(islogin)){				
			     
				 HashMap<String, Object> map = new HashMap<String, Object>();
		         map.put("condition", xt_users);
		         map.put("order", "order by user_id desc");
		         try {
					 list =  doPage(usersService,xt_users,map);	
					 returnVO.returnCode = ReturnConstant.IS_DEAL_OK;
		         }catch (Exception e) {
						returnVO.returnCode = ReturnConstant.IS_ERR;
						returnVO.returnDesc = e.getMessage();
						log.error(e.getMessage(),e);
					}
			 }else{
				 returnVO.returnCode = ReturnConstant.IS_NOT_LOGIN;
			 }
			 return "list";
		} 
		
	

	public void setUsersService(UsersService usersService) {
		this.usersService = usersService;
	}
	public List<Xt_users> getList() {
		return list;
	}
	public void setList(List<Xt_users> list) {
		this.list = list;
	}

	public Xt_users getXt_users() {
		return xt_users;
	}

	public void setXt_users(Xt_users xt_users) {
		this.xt_users = xt_users;
	}


	
	
}
